<?php
echo $callbackFunction . '({';
echo '"totalCount":"' . $count . '",';
echo '"features":[';
$counter = 0;
foreach ($data as $feature) {
	$counter++;
	echo '{';
	echo '"id":"' . $feature->id . '",';
	echo '"title":"' . addcslashes(htmlspecialchars($feature->title, ENT_QUOTES), '\\') . '",';
	echo '"actions":"<a href=\"javascript: editFeature(' . $feature->id  . ');\">изменить</a>&nbsp;<a href=\"javascript: deleteFeature(' . $feature->id . ');\">удалить</a>"';
	echo '}';
	if ($counter != count($data)) echo ',';
}
echo ']});'; ?>